import java.util.Scanner;


public class pArrayStackIntTester
{
   public static void main(String[] args)
   {
      pArrayStackInt myStack = new pArrayStackInt(10);
      Scanner input = new Scanner(System.in);
      int myinput;
      
      while(true)
      {
         System.out.println("Enter number in stack: ");
         myinput = input.nextInt();
         myStack.push(myinput);
         if (myStack.isFull())
         {
            System.out.println("Stack is full");
            while(true)
            {
               System.out.println("Pop out: "+myStack.pop());
               if (myStack.isEmpty())
                  break;
            }
            break;
         }
      }
      
   }
}
